import request from '@/utils/request'

// 查询不合格品记录列表
export function listNonconforming(query) {
  return request({
    url: '/qep/nonconforming/list',
    method: 'get',
    params: query
  })
}

// 查询不合格品记录详细
export function getNonconforming(id) {
  return request({
    url: '/qep/nonconforming/' + id,
    method: 'get'
  })
}

// 新增不合格品记录
export function addNonconforming(data) {
  return request({
    url: '/qep/nonconforming',
    method: 'post',
    data: data
  })
}

// 修改不合格品记录
export function updateNonconforming(data) {
  return request({
    url: '/qep/nonconforming',
    method: 'put',
    data: data
  })
}

// 删除不合格品记录
export function delNonconforming(id) {
  return request({
    url: '/qep/nonconforming/' + id,
    method: 'delete'
  })
}

// 统计不合格品数量
export function countNonconforming(query) {
  return request({
    url: '/qep/nonconforming/count',
    method: 'get',
    params: query
  })
} 